package 天梯赛.tts44;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int count=0;
        while (true){
            String str=sc.next();
          //  System.out.println("输入"+str);
            if (str.equals("End")){
                break;
            }
            if (count%(n)==0&&count!=0){
                System.out.println(str);
            }else{
                if (str.equals("Bu")){
                    System.out.println("JianDao");
                }else if (str.equals("ChuiZi")){
                    System.out.println("Bu");
                }else if (str.equals("JianDao")){
                    System.out.println("ChuiZi");
                }
            }
            count++;
        }
    }
}
